A data communication system usually consists of several communicating nodes connected to a communication medium such as a data bus, exchanging message data across the communication medium. Each communicating node typically contains a communication controller configured to listen to signals on the bus, receive data from the bus and send data across the bus to other nodes. In order to allow for meaningful signal exchange, data transmission is performed according to a communication protocol, which may consist of a stack of different protocols defining rules for different layers of communication such as the physical access to the communication medium or the transport of data between nodes.
A node may for example contain a processing device such as a microcontroller. In an automotive environment for example, a processing device may be an electronic control unit, that is any embedded system that controls one or more of the electrical systems or subsystems in a motor vehicle. Nodes may communicate using a communication protocol. For automotive applications, the Controller Area Network (CAN) protocol or the FlexRay protocol may be used, just to give some examples. The CAN bus is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle. FlexRay provides an alternative solution being faster and more reliable. The FlexRay communication protocol is based on a time division multiple access (TDMA) scheme for accessing the communication medium by several devices, which requires synchronization between nodes to be established during a start phase of the communication system.
Referring to FIG. 1, a schematic example of a first message sequence chart 10, having a vertical time axis, of a failing startup sequence of a prior art communication controller unit 14 is shown. The startup phase may be a period of high event rates. In the shown example, a software module 12 triggers a startup of a FlexRay controller 14 setting up communication with other FlexRay controllers 16 in a communications system. The controller 14 receives configuration data 18 and subsequent run startup command 20 from the software module 12. The controller starts to set up communication 22 with the controllers 16 of the other communicating nodes. After a certain time, startup communication 14 fails and the controller 14 indicates the failure to the software module 12. In the shown example, the FlexRay controller 14 may issue a message 24 to the software module 12, which is an indication that the communication could not be established and that the protocol state machine failed to enter its normal activity state. However, after receiving the failure message 24, no reason for the malfunction may be derived 26 by the software module.
In case of a malfunction of the communication system detected at a communication controller of the system, debugging of the system as a methodical process of finding and removing or at least reducing the number of defects may be applied. For this, trace information containing for example relevant protocol events such as register content changes for rate and offset correction values, state changes of a state machine implementing the protocol execution, or slot status information, just to name a few, may be analysed.
With single-step debugging, these information can be acquired by inserting breakpoints into the operation of the protocol to cause an interruption of protocol execution and read out status information from the controller for further analysis. However, during time of interruption, controllers of other nodes may continue processing and communicating, therefore changing their states and the state of the communication bus.
Or for example status information of controller state registers may be traced during execution of the communication protocol, avoiding interruption of protocol execution. The process of accessing and reading the relevant information to be traced for example from status registers consumes a portion of system resources such as bandwidth of an internal data bus and requires additional processor load. This intrusive approach may change or disturb the time flow of protocol execution, which may be relevant for example when real time execution is desired. During periods of high event rates on the communication medium, such as the startup phase of the system, only a part of the events may be traced in order to reduce influence on the schedule of the protocol flow.
In WO2008/110957 A2 a monitoring device coupled to a FlexRay communication system is described which intrusively checks the communication controller for protocol conform behavior of the controller. The shown bus guardian implements own counters and timers for observing the correct behavior of the communication controller. It implements separate reference state machines in order to compare the transitions of the communication controller state machine against its reference.
In U.S. Pat. No. 6,854,029 B2 a DSP bus monitoring apparatus is described. An embedded processor as a monitoring device for an internal bus of a system, which is not a distributed communication system, is provided as a testing tool. The bus monitor resides within the same chip or module as a digital signal processor (DSP), which allows connection to internal processor buses not accessible from external contacts. The monitor uses a separate circular buffer to continuously store data traces from each of one or more internal processor buses. Upon the occurrence of a trigger condition, storage stops and a trace is preserved for evaluation of processor operation.
In U.S. Pat. No. 7,149,926 B2 a configurable trace port for embedded processors is described. A trace port is provided which selectively limits the amount of trace information passed from a processor core to an output buffer. The processor trace data can be compressed to meet an adjustable read-out rate of the output buffer.
In US 2008/0115115 A1 an embedded trace macrocell for DSP debugging operations is shown. The macrocell records selectable aspects of a non-intrusively monitored software execution and generates breakpoints.